<?php

declare(strict_types=1);

namespace App\Helpers;

/**
 * Herramientas para HTML.
 */
class HTML
{
    private const FLAGS = ENT_COMPAT | ENT_HTML5;

    /**
     * Escapa un texto.
     */
    public static function esc(?string $text): string
    {
        return htmlentities($text ?? '', self::FLAGS);
    }
}
